#include <iostream>
using namespace std;

int main()
{
	int ival;
	while(cin >> ival, !cin.eof())
	{
		if (cin.bad())
		{
			throw runtime_error("IO stream obnormal!");
			exit(0);
		}
		else if(cin.fail())
		{
			cerr << "bad data, try again";
			cin.clear(istream::failbit);
			continue;
		}
		else
			cout << ival << endl;
	}
	return 0;
}
